﻿<!--#include file="conn.asp"-->
<%if request("act")="save" then%><%
if request("id")="" then
response.write("<script>alert('错误:没有选定任何内容!');history.go(-1)</script>")
response.end
end if
conn.execute("update comics set classid = ("&request("classid")&") where id in("&request("id")&")")
conn.execute("update comics set dqid = ("&request("diquid")&") where id in("&request("id")&")")
conn.close
set conn=nothing
response.write("<script>alert('修改类别成功!');location.href='comics_manage.asp'</script>")
response.end
end if%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="images/style.css" type="text/css" rel="stylesheet">
    <meta content="MSHTML 6.00.3790.0" name="GENERATOR">
    <style type="text/css">
<!--
.STYLE1 {font-weight: bold}
-->
</style>
</head>
<body style="font-size: 12px; v-text-align: center" leftmargin="0" topmargin="3"
    align="center" marginheight="0" marginwidth="0">
    <form name="form1" method="post" action="?act=save">
    <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
        <tr>
            <td height="30" colspan="7" bgcolor="e1e1e1">
                <div align="center">
                    批量修改</div>
            </td>
        </tr>
        <% 
id=replace(request("id"),"","")
if request("id")="" then
response.write("<script>alert('错误：漫画没有选择!');history.go(-1)</script>")
response.end
end if%>
        <%i=0
set rs=server.createobject("adodb.recordset")
sql="select * from comics where id in (" & id & ")"
rs.open sql,conn,1,1
Do While Not rs.eof
    id=rs("id")
	classid=rs("classid")
	dqid=rs("dqid")
	mhmc=rs("mhmc")
i=i+1

        %>
        <tr>
            <%for jj=1 to 3
if rs.eof then exit for
            %><td width="4%" bgcolor="#FFFFFF">
                <div align="center">
                    <%=rs("id")%></div>
                <div align="right">
                </div>
            </td>
            <td width="27%" bgcolor="#FFFFFF">
                <input name="id" type="checkbox" value="<%=rs("id")%>" checked>&nbsp;<%=rs("mhmc")%>
            </td>
            <%
rs.movenext
  next%>
        </tr>
        <%
 loop 
rs.close
        %>
        <tr>
            <td colspan="7" bgcolor="#f1f1f1">
                <div align="center">
                    选择漫画分类：<select name="classid" size="1">
                        <%set rs2=conn.execute("select * from class order by ID desc")
						  do while not rs2.eof%>
                        <option value="<%=rs2("ID")%>">
                            <%=rs2("classname")%></option>
                        <%rs2.movenext
						  loop
						  set rs2=nothing%>
                    </select>&nbsp;&nbsp;选择漫画地区：<select name="diquid" size="1">
                        <%set rs2=conn.execute("select * from diqu order by ID desc")
						  do while not rs2.eof%>
                        <option value="<%=rs2("ID")%>">
                            <%=rs2("diqu")%></option>
                        <%rs2.movenext
						  loop
						  set rs2=nothing%>
                    </select>
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="7" bgcolor="#FFFFFF">
                <div align="center">
                    <input name="goback" type="button" class="Submit" id="goback" value="返回" onclick="history.go(-1)">
                    &nbsp;
                    <input name="newrank" type="submit" class="Submit" id="newclass" value="批量修改">
                </div>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
